package cobersky.engine.core
{
	import cobersky.skinUI.core.BluePrint;
	
	import flash.display.DisplayObject;

	public class BasicFanctory
	{
		public static function create($blue:BluePrint):DisplayObject{
			return setProperties(new $blue.factoryClass(),$blue.properties);
		}
		public static function setProperties(a:Object,p:Object):DisplayObject{
			for(var i:String in p){
				if(a.hasOwnProperty(i)){
					a[i]=p[i];
				}
			}
			return a as DisplayObject;
		}
	}
}